package com.sn.campus;

import com.sn.campus.nettyserver.NettyServer;
import com.sn.campus.utils.GetShipLocation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.Resource;


@EnableScheduling
@SpringBootApplication
@MapperScan("com.sn.campus.dao")
public class CampusApplication implements CommandLineRunner {
    private Logger log = LogManager.getLogger(getClass());
    @Resource
    private NettyServer nettyServer;

    @Resource
    private GetShipLocation getShipLocation;
    public static void main(String[] args) {
        SpringApplication.run(CampusApplication.class,args);


    }

    @Override
    public void run(String... args) throws Exception {
//        InetSocketAddress address = new InetSocketAddress(DefaultConstants.SOCKET_IP,DefaultConstants.SOCKET_PORT);
//        nettyServer.start(address);
//        log.info("nettyserver start serverip:"+ DefaultConstants.SOCKET_IP);
//        log.debug(Thread.currentThread().getName());
//        getShipLocation.getDate();
        System.out.println("ceshi------------");
    }
}
